import request from '/@/utils/request';

// 查询巡检设备列表
export function listTerminals(query?: Object) {
  return request({
    url: '/module/terminals/list',
    method: 'get',
    params: query
  })
}

// 查询巡检设备详细
export function getTerminals(id?: number) {
  return request({
    url: '/module/terminals/' + id,
    method: 'get'
  })
}

// 新增巡检设备
export function addTerminals(data?: Object) {
  return request({
    url: '/module/terminals',
    method: 'post',
    data: data
  })
}

// 修改巡检设备
export function updateTerminals(data?: Object) {
  return request({
    url: '/module/terminals',
    method: 'put',
    data: data
  })
}

// 删除巡检设备
export function delTerminals(id?: number) {
  return request({
    url: '/module/terminals/' + id,
    method: 'delete'
  })
}

// 导出巡检设备
export function exportTerminals(query?: Object) {
  return request({
    url: '/module/terminals/export',
    method: 'get',
    params: query
  })
}

// 重置二维码
export function resetQrCode(data?: Object) {
  return request({
    url: '/module/terminals/resetQrCode',
    method: 'post',
    data: data
  })
}
